This repository contains the data and code necessary to replicate "Expert Bias and Democratic Erosion: Assessing Expert Perceptions of Contemporary American Democracy," published in *PS: Political Science and Politics" by Bergeron-Boutin, Carey, Helmke, and Rau (2023). 

Note that the Bright Line Watch survey data (for both the expert and public samples) has been pre-processed to reduce file size and facilitate replication. The full survey data is available on the Bright Line Watch website: http://brightlinewatch.org/survey-data-and-replication-material/

The code is extensively commented to facilitate replication. The repository contains an R project to avoid errors related to working directories. All figures are saved to the "figures" folder (in both .png and .tiff formats). 

Some general information:
- Bright Line Watch has conducted 19 survey waves from 2017 to 2023. For most of these, we collected data from both an expert sample and a public sample. Exceptions include waves 1, 2, and 11, which are all expert-only. 
- The script "functions.R" contains a handful of functions that help with the analysis. 
- Note that the font used in the figures that appear in the paper (Fira Sans) is not reproduced here in order to facilitate replication, since this font generally needs to be loaded manually into R. Other than the font, the figures are exact replications of those that appear in the paper. 

Information on variables in the datasets: 
- wave: survey wave for a particular row (1-19)
- LuthID (only for expert data): a unique identifier for an expert respondent, constructed by a survey company such that we anonymously track a given political scientist over multiple waves. In wave 19, an implementation error resulted in the first ~120 respondents not having their LuthID properly captured (which explains why the wave 19 data is not used for figure 1). For our purposes here, we did not include the LuthID values for wave 19 respondents. 
- caseid (only for public data): unique identifier from survey company. 
- weight (only for public data): weight provided by survey company to make sample representative. 
- pid7 (only for public sample): party ID. 
- rusa_now (named rating_USA in public data), rusa_5y, and rusa_10y: ratings of U.S. democracy now, in 2027, and in 2032. The latter two questions are recent additions to BLW surveys, while the first has always appeared. Note that wave 1 (expert-only) used a 10-point scale instead of an 100-point scale (which is why data from this wave was not used in figure 1). 
- twitter_usage and twitter_democracy_usage (only for expert data): how often respondents use Twitter and how often they tweet about issues related to U.S. democracy. The scale runs from 1 (Daily) to 7 (Never). 
- vdem_invite (only for expert data): whether a respondent has ever been invited to serve as a coder for the V-Dem project. 1 = Yes; 2 = No. 
- vdem_participate (only for expert data): conditional on having been invited, whether a respondent participated in V-Dem coding. 1 = Yes; 2 = No. 
- vdem_would (only for expert data): conditional on *not* having been invited, whether a respondent would agree to serve a V-Dem coder if they were invited. 1 = Yes; 2 = No. 
- rating_***: ratings of democracy in various countries, on 100-point scale. Note that the countries we asked about in waves 17 and 19 differ, so some countries will only have NA values for a given wave. Respondents were also randomly assigned to rate a random sample of all countries that we asked about, which is why there are NA values for any given respondent. 
- perf_***: rated performance of U.S. democracy on 30 different principles. Respondents were also randomly assigned to rate a random sample of all items that we asked about, which is why there are NA values for any given respondent. 1 = does not meet standard; 2 = partly meets standard; 3 = mostly meets standard; 4 = fully meets standard; 5 = Don't know. 

